STEP 4: Anything we put inside the if statement will run if the test is true.

This if statement checks to see if the user chose rock, and sets an image and text to appear if they did.

  • Go to . Drag out Say and drop it into your if block, indented under your rock sprite.
  • Change the name in front of .say() to player.
  • Change the string in .say() to "I choose rock"


To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)